<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <meta http-equiv="X-UA-Compatible" content="ie=edge">
  <title>Document</title>
  <link rel="stylesheet" href="./lib/bootstrap/css/bootstrap.css">
  <link rel="stylesheet" href="./lib/bootstrap-validator/css/bootstrapValidator.min.css">
  <link rel="stylesheet" href="./lib/nprogress/nprogress.css">

  <link rel="stylesheet" href="./css/common.css">
</head>

<body>
  <!-- ------左侧导航栏 -->
  <div class="lt_aside transition1 ">
    <div class="ix-top text-center">
      <a href="index.html">乐淘商城</a>
    </div>
    <div class="ix-user text-center">
      <img src="./images/default.png" alt="">
      <p>超级管理员</p>
    </div>
    <div class=" ix-branch">
      <ul>
        <li>
          
          <a href="user.html"><i class="glyphicon glyphicon-user"></i> 用户管理</a>
        </li>
        <li class="ix-nav">
          
          <a href="#"><i class="glyphicon glyphicon-th-list"></i> 分类管理</a>
          <ol class="ix-hide">
            <li><a href="one.html">一级分类</a></li>
            <li><a href="two.html">二级分类</a></li>
          </ol>
        </li>

        <li class="lt-bgbd"><a href="#"><i class="glyphicon glyphicon-tags"></i> 商品管理</a></li>
      </ul>
    </div>
  </div>
  <!-- --------主体部分 -->
  <div class="lt-main p-180 transition">
    <!-- ----主体按钮部分 -->
    <div class="main-nav p-180 transition">
      <i class="glyphicon glyphicon-menu-hamburger pull-left main-hamburger cursor"></i>
      <i class="glyphicon glyphicon-log-out pull-right log-out cursor"></i>
    </div>
    <!-- -----------------------面包屑导航---------------------------->
    <div class="main-mbx">
      <ol class="breadcrumb">
        <li><a href="#">管理系统</a></li>
        <li class="active">商品管理</li>
      </ol>
    </div>


    <!-- -----------------------添加商品按钮----------------------- -->
    <button class="btn btn-default one-btn" data-toggle="modal" data-target="#myModal">添加分类</button>
    <!------------------------- table栏 ----------------------------->
    <table class="table table-bordered table-hover text-center ">
      <thead>
        <tr>
          <th>序号</th>
          <th>商品名称</th>
          <th>商品描述</th>
          <th>商品库存</th>
          <th>商品尺寸</th>
          <th>商品状态</th>
          <th>操作</th>
        </tr>
      </thead>
      <tbody>

      </tbody>
    </table>
    <div class="pull-right">
      <ul id="paginator"></ul>
    </div>
  </div>
  <!----------------------------- 模态框 ----------------------------->
  <div class="modal fade" data-toggle="modal" id="myModal">
    <div class="modal-dialog">
      <div class="modal-content">
        <div class="modal-header">
          <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span
              aria-hidden="true">&times;</span></button>
          <h4 class="modal-title">添加商品</h4>
        </div>
        <div class="modal-body">
          <!------------------ 下拉菜单------------------------- -->
          <form id="form">
            <!-- --------添加商品 ---------------->
            <div class="form-group">
              <div class="dropdown">
                <button type="button" class="btn btn-default dropdown-toggle btn-fiy" data-toggle="dropdown"
                  aria-haspopup="true" aria-expanded="false">
                  <span class="spa"> 请选择二级分类</span>
                  <span class="caret"></span>
                </button>
                <ul class="dropdown-menu">
                  <li><a href="#">Action</a></li>
                </ul>
              </div>
              <input type="hidden" name="brandId" id="brandId" value="">
            </div>
            <div class="form-group">
              <input type="text" class="form-control" placeholder="请输入名称" name="proName">
            </div>
            <div class="form-group">
              <textarea name="proDesc" id="proDesc" class="form-control" placeholder='请输入商品描述'></textarea>
            </div>
            <div class="form-group">
              <input type="text" class="form-control" placeholder="请输入商品库存" name="num">
            </div>
            <div class="form-group">
              <input type="text" class="form-control" placeholder="请输入商品尺码" name="size">
            </div>
            <div class="form-group">
              <input type="text" class="form-control" placeholder="请输入商品原价" name="oldPrice">
            </div>
            <div class="form-group">
              <input type="text" class="form-control" placeholder="请输入商品现价" name="price">
            </div>
            <div class="form-group">
              <label>
                
                <span class="btn btn-default"> 上传图片</span>
                <input id="fileupload" type="file" name="pic1" class="hide" data-url="/product/addProductPic" multiple>
              </label>
              <input type="hidden" name="picArr" id="picArr">
            </div>
            
            <div class="form-group" id='img'>

            </div>
          </form>
        </div>
        <div class="modal-footer">
          <button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
          <button type="submit" class="btn btn-primary" form="form">确定</button>
        </div>
      </div><!-- /.modal-content -->
    </div><!-- /.modal-dialog -->
  </div><!-- /.modal -->
  <!-- 模板引擎 -->
  <script type='text/html' id='tmp'>
    {{each rows v i}}
    <tr>brandId: 2
        id: 6
        num: 44
        oldPrice: 342
        price: 112
        proDesc: "描述123123"
        proName: "【莹恋】MIZUNO美津浓V1GA159002乒乓球鞋男鞋女鞋室内综合训练鞋"
        size: "35-56"
        statu: 1
        updateTime: "2017-01-04T16:48:05.000Z"
        <td>{{i+1 + size*(page-1)}}</td>
        <td>{{v.proName}}</td>
        <td>{{v.proDesc}}</td>
        <td>{{v.num}}</td>
        <td>{{v.size}}</td>
        <td>{{v.statu == 1 ? '已上架' : '已下架'}}</td>
        <td>
          {{if v.statu == 1 }}
            <button class='btn btn-danger'>下架</button>
          {{else}}
            <button class='btn btn-success'>上架</button>
          {{/if}}
        </td>
      </tr>
    {{/each}}
  </script>
  <script type='text/html' id='tmp-one'>
    {{each rows v i}}
      <li><a href="#" data-id={{v.id}}>{{v.brandName}}</a></li>
    {{/each}}
  </script>
  <!-- jquery -->
  <script src="./lib/jquery/jquery.min.js"></script>
  <!-- bootstrap.min.js -->
  <script src="./lib/bootstrap/js/bootstrap.min.js"></script>
  <!-- bootstrapValidator.min.js -->
  <script src="./lib/bootstrap-validator/js/bootstrapValidator.min.js"></script>
  <!-- bootstrap-paginator.min.js --------------分页器-->
  <script src="./lib/bootstrap-paginator/bootstrap-paginator.min.js"></script>
  <!--nprogress.js-----------/----------------  进度条插件------------->
  <script src="./lib/nprogress/nprogress.js"></script>
  <!--template-web.js --------------------------模板引擎插件 -->
  <script src="./lib/artTemplate/template-web.js"></script>
  <!------------------------------------  ----- 上传图片------->
  <script src="./lib/jquery-fileupload/jquery.ui.widget.js"></script>
  <script src="./lib/jquery-fileupload/jquery.iframe-transport.js"></script>
  <script src="./lib/jquery-fileupload/jquery.fileupload.js"></script>
  <!------------------------------------------- 公共js -->
  <script src="./js/common.js"></script>
  <!-- -----------------------------------------商品管理js -->
  <script src="./js/pordact.js"></script>
</body>

</html>